import requests

from common.get_headers import get_headers
from config import BASE_URL


class UsersApi:

    def add_user(self, headers, body):
        url = BASE_URL + "/api/sys/user"
        resp = requests.post(url, headers=headers, json=body)
        return resp



headers = get_headers()
body = {
    "username": "张三",
    "mobile": "18610123456",
    "workNumber": "123",
    "timeOfEntry": "2023-01-01",
    "formOfEmployment": "1",
    "departmentId": "10086",
    "correctionTime": "2023-06-01"
}

data = UsersApi().add_user(headers, body)
print(data.json())
